package com.indusfo.spc.client.service;

import java.util.List;

import com.indusfo.spc.client.pojo.ClientSpcDete;
import com.indusfo.spc.client.pojo.ClientSpcOrder;
import com.indusfo.spc.client.pojo.ClientSpcTest;
import com.indusfo.spc.pojo.OrderFlow;

/**
 * 客户端检测单
 * 
 * @author zhengd
 *
 */
public interface ClientSpcOrderService {
	/**
	 * 客户端检测单保存
	 * 
	 * @param clientSpcOrder
	 * @return
	 */
	Integer saveClientSpcOrder(ClientSpcOrder clientSpcOrder);

	/**
	 * 客户端检测单更新
	 * 
	 * @param clientSpcOrder
	 * @return
	 */
	Integer updateClientSpcOrder(ClientSpcOrder clientSpcOrder);

	/**
	 * 客户端检测单高级查询
	 * 
	 * @param ClientSpcOrder
	 * @return ClientSpcOrder
	 */
	List<ClientSpcOrder> queryClientSpcOrder(ClientSpcOrder clientSpcOrder);

	/**
	 * 客户端检测单高级查询记录数
	 * 
	 * @param ClientSpcOrder
	 * @return Integer
	 */
	Integer countQueryClientSpcOrder(ClientSpcOrder clientSpcOrder);

	/**
	 * 根据任务单ID和工序ID查询流程ID
	 * 
	 * @param OrderFlow
	 * @return Integer
	 */
	Integer queryOrderFlowIdByOrderId(OrderFlow orderFlow);

	/**
	 * 根据检测单ID查询检测项目
	 * 
	 * @param spcOrderId
	 * @return
	 */
	List<ClientSpcDete> queryClientSpcDete(Integer spcOrderId);

	/**
	 * 根据检测单ID查询基本信息
	 * 
	 * @param spcOrderId
	 * @return
	 */
	ClientSpcTest queryClientSpcTest(Integer spcOrderId);

	/**
	 * 根据任务单ID查询工序
	 * 
	 * @param orderId
	 * @return
	 */
	List<OrderFlow> selectProByOrderId(Integer orderId);
	
	/**
	 * 客户端检测单完成
	 * 
	 * @param clientSpcOrder
	 * @return
	 */
	String finishClientSpcOrder(ClientSpcOrder clientSpcOrder);
}
